package com.res.share.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Transient;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author astupidcoder
 * @since 2021-09-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("res_category")
public class ResCategory extends Model {
    private static final long serialVersionUID = 1L;
    @TableId(value = "ID", type = IdType.AUTO)
    private Integer id;
    @TableField("PID")
    private Integer pid;
    @TableField("CATEGOTY_NAME")
    private String categotyName;
    @TableField("CATEGORY_PIN_YIN")
    private String categoryPinYin;
    @TableField("URL")
    private String url;
    @TableField("PIDS")
    private String pids;
    @TableField("LEVEL")
    private Integer level;
    @TableLogic(value = "0", delval = "1")
    @TableField("IS_DEL")
    private Integer isDel;
    @TableField(exist = false)
    private List<ResCategory> children;
}
